//package com.wjk.kylin.rpc.samples.provider.config;
//
//import com.wjk.kylin.rpc.core.registry.RegistryTypeEnum;
//import com.wjk.kylin.rpc.core.provider.impl.RpcSpringProviderFactory;
//import com.wjk.kylin.rpc.core.serialize.Serializer;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//@Slf4j
//@Configuration
//public class RpcProviderConfig {
//    @Value("${kylin.rpc.provider.enable}")
//    private String providerEnable;
//    @Value("${kylin.rpc.registry.address}")
//    private String registryAddress;
//    @Value("${kylin.rpc.registry.type}")
//    private RegistryTypeEnum registryType;
//    @Value("${kylin.rpc.serializer}")
//    private Serializer.Algorithm serializer;
//
//    @Bean
//    public RpcSpringProviderFactory rpcSpringProviderFactory() {
//
//        RpcSpringProviderFactory providerFactory = new RpcSpringProviderFactory();
//        providerFactory.setSerializer(serializer);
////        providerFactory.setIp(null);
////        providerFactory.setAccessToken(null);
//        providerFactory.setServiceRegistryType(registryType);
//        providerFactory.setServiceRegistryAddress(registryAddress);
//
//        log.info(">>>>>>>>>>> RpcSpringProviderFactory kylin-rpc provider config init finish.");
//        return providerFactory;
//    }
//}
